1. Field of the Invention
The present invention relates to a non-volatile semiconductor memory device to be used as, for example, a memory medium for a digital camera and a mobile information apparatus, and to a memory system.
2. Description of the Related Art
A memory card is used as a memory medium for a digital still camera and a mobile information apparatus. This memory card is configured such that a very small recess is provided in a thin plastic package and a non-volatile semiconductor device which comprises a flash memory using an EEPROM is embedded in the recess. The memory card is electrically connected to a host system via, for example, a dedicated connector to perform an input and an output of data between the memory card and the host system.
For example, a non-volatile semiconductor memory of 128M bits is divided into 1024 physical memory blocks. The block is a minimum unit at the time of erasing data. Data in memory cells are erased in block units. One block is further divided into 32 physical pages. One page constitutes a data writing and reading unit. One page is configured by 528 bytes, and 512 bytes out of 528 bytes constitute a user data region while the remaining 16 bytes are used as a redundancy region for storing error codes, management information and the like.
The redundancy region has a block status flag. With respect to the block status flag, 32 bits are provided for one block in the case where one block is configured by 32 pages. That is, the block status flag of 1 bit is arranged on each page. Depending on the data of the block status flag, it is determined whether the corresponding block is a normal block or a defective block. With respect to the normal block, “FFh” (symbol “h” denotes a hexadecimal) is written in the block status flag. In the case where the block is determined to be defective before shipment, “00h” is written in the block status flag. In the case where a defective state is generated during the user uses the non-volatile semiconductor memory after shipment, “F0h” is written in the block status flag. In the case where data “0” is written in two bits or more of the block status flag, the corresponding block is determined to be defective.
As a technique for saving such a defective state of the memory region, there has been developed a technique for replacing the defective region for each sector instead of the saving of each block (refer to, for example, Jpn. Pat. Appln. KOKAI Publication No. 2003-58431).
Meanwhile, in the non-volatile semiconductor memory for managing the defective state for each block, only data of the block status flag in the first page of each block is generally referred to in order to improve the detection efficiency of the defective blocks. That is, in the case where data of the status flags in all the pages in the block are read, it takes a long time to detect a defective block, and thus, the following method is adopted. As a consequence, in the case where a defective block is detected before shipment, data “00h” is written in the block status flag in each page of the block, and in particular, the data “0” must be certainly written in on the first page. Therefore, the memory in which the data item “0” cannot be written in the first page of the block does not enable identification of the defective block, so that the memory cannot be shipped out, which causes a decrease in the yield.
On the other hand, in the case where a defective block occurs at the time of usage by the user after the shipment, the data “F0h” is written in the block status flag in each page of the block. However, in the case where at least two or more bits of data cannot be written in the first page of the block, the data cannot be treated as a defective block. For this reason, there is a possibility that the defective block is treated as a normal block again, and there arises a situation in which a normal memory control is not performed.
Further, there is a problem in that in the case where a defective block is present, it is required to perform the reading operation a plurality of times in order to determine the presence of the defective block, so that it takes a long time to detect the defective block and the system performance thereof is deteriorated.
Furthermore, at the time of updating data stored in the memory card, it is necessary to detect the state of the block, but it takes a long time to detect the state of the conventional blocks.
Therefore, there is demand for a non-volatile semiconductor memory device and a memory system, the device being capable of securely detecting a block state of a defective block or the like at a high speed, and being capable of suppressing a deterioration of the system performance.